package org.example.application;

import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsAccessRecordReq;
import org.example.domain.model.entity.url.req.UrlShortenerGroupStatsReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsAccessRecordReq;
import org.example.domain.model.entity.url.req.UrlShortenerStatsReq;
import org.example.domain.model.entity.url.resp.UrlShortenerStatsResp;
import org.example.domain.model.entity.url.vo.UrlShortenerStatsAccessRecordVo;
import org.example.domain.model.service.UrlShortenerStatsDomainService;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
@Slf4j
public class UrlShortenerStatsService {
    private final UrlShortenerStatsDomainService urlShortenerStatsDomainService;

    public UrlShortenerStatsResp oneUrlShortenerStats(UrlShortenerStatsReq urlShortenerStatsReq) {
        return urlShortenerStatsDomainService.oneUrlShortenerStats(urlShortenerStatsReq);
    }

    public Object groupUrlShortenerStats(UrlShortenerGroupStatsReq urlShortenerGroupStatsReq) {
        return urlShortenerStatsDomainService.groupUrlShortenerStats(urlShortenerGroupStatsReq);
    }

    public PageInfo<UrlShortenerStatsAccessRecordVo> urlShortenerStatsAccessRecord(UrlShortenerStatsAccessRecordReq urlShortenerStatsAccessRecordReq) {
        return urlShortenerStatsDomainService.urlShortenerStatsAccessRecord(urlShortenerStatsAccessRecordReq);
    }

    public PageInfo<UrlShortenerStatsAccessRecordVo> groupUrlShortenerStatsAccessRecord(UrlShortenerGroupStatsAccessRecordReq urlShortenerGroupStatsAccessRecordReq) {
        return urlShortenerStatsDomainService.groupUrlShortenerStatsAccessRecord(urlShortenerGroupStatsAccessRecordReq);
    }
}
